<?php
require_once ("include/common.inc.php");
require_once "include/arc.partview.class.php";
require_once('include/charset.func.php');

$year = date("Y");
$month = date("m");
$day = date("d");
$dayBegin = mktime(0,0,0,$month,$day,$year);//当天开始时间戳
$dayEnd = mktime(23,59,59,$month,$day,$year);//当天结束时间戳

$query = "SELECT arch.id,arch.filename,types.namerule FROM wzwa_arctype as types inner join wzwa_archives as arch on types.id=arch.typeid where pubdate<".$dayEnd." AND pubdate>".$dayBegin."";
//echo $query;
$urls="";
               
$dsql->Execute('arch.id,arch.filename,types.namerule',$query);
while($row = $dsql->GetArray('arch.id,arch.filename,types.namerule'))
{   if(!$row['filename']){
        $urls.="https://m.vrrw.net/".str_replace("{aid}.html","",$row['namerule']).$row['id'].".html".",";
    }else{ 
		$urls.="https://m.vrrw.net/".str_replace("{aid}.html","",$row['namerule']).$row['filename'].".html".",";
    };

    /* $urls.="https://m.vrrw.net/".str_replace("{aid}.html","",$row['namerule']).$row['filename']=$row['filename']?$row['filename']:$row['id'].".html".","; */   
    //将上边换成你的网址
}
$urls=substr($urls,0,-1);
$urls    = explode(",",$urls);
$api = 'http://data.zz.baidu.com/urls?appid=1547301769280599&token=TWdhGuuTK76GWOrd&type=realtime'; // 前边的熊掌号ID和密钥换成自己的
$ch = curl_init();
$options = array(
        CURLOPT_URL => $api,
        CURLOPT_POST => true,
        CURLOPT_RETURNTRANSFER => true,
        CURLOPT_POSTFIELDS => implode("\n", $urls),
        CURLOPT_HTTPHEADER => array('Content-Type: text/plain'),
);
curl_setopt_array($ch, $options);
$result = curl_exec($ch);
echo $result;
?>